package pe.com.android.model.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
* @author Marko Ramirez Larzo
*/
public class DBConnection {
    public static String driver = "com.mysql.jdbc.Driver";
    public static String url = "jdbc:mysql://localhost/dat_courier_web";
    public static String usuario = "root";
    public static String password = "";
    
    public static Connection getConnection(){
        Connection conn = null;
        try {
            Class.forName(driver).newInstance();
            conn =DriverManager.getConnection(url, usuario, password);
        } catch (Exception ex) {
            Logger.getLogger(DBConnection.class.getName()).log(Level.SEVERE, null, ex);
            System.out.println("No se obtuvo la conexioón");
            conn = null;
        }
        return conn;
    }
}
